﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    internal class Bullet
    {
        public int X;
        public int Y;
        public bool IsAlive = true;
        private Image bulletImage;

        public Bullet(int x,int y)
        {
            X = x;
            Y = y;
            bulletImage = Image.FromFile("gif\\bullet2.png");
        }

        public void Draw(Graphics g)
        {
            g.DrawImage(bulletImage, X, Y, 20, 20);

        }

        public void Move()
        {
            Y -= 10;
        }
        public Rectangle GetRectangle()
        {
            return new Rectangle(X, Y, 20, 20);
        }
    }
}
